/*
 * @Description: 检查填报内容基础组件
 * @Author: mengjiajun
 * @Date: 2023-12-27 14:37:29
 * @LastEditors: mengjiajun
 * @LastEditTime: 2023-12-27 15:15:27
 * @FilePath: \foodstuff-safety-responsibility\src\pages\IntelFilling\components\WeekReport\components\CheckAndFillIn\components\CheckItem.tsx
 */

import { Field, Radio, Textarea } from "@taroify/core";
import { View, Text } from "@tarojs/components";

type TCheckItemProps = {
  options: {
    title: string;
  }[];
};

const CheckItem: React.FC<TCheckItemProps> = ({ options }) => {
  return (
    <View className="p-4 bg-white rounded-lg">
      {options.map((_item, _index) => (
        <View key={_index} className="flex flex-col w-full gap-2">
          <View>{`${_index + 1}.${_item.title}`}</View>
          <View>
            <Radio.Group defaultValue="1" direction="horizontal">
              <Radio name="1">符合</Radio>
              <Radio name="2">不符合</Radio>
            </Radio.Group>
          </View>
          <View>
            <View className="flex justify-between w-full h-[80px] items-center">
              <Text>情况描述：</Text>
              <Text className="text-red-500">查看同行风险</Text>
            </View>
            <Field
              align="start"
              className=" border border-solid border-[#aaaaaa] rounded"
            >
              <Textarea
                style={{ height: "48px" }}
                placeholder="请输入情况描述"
              />
            </Field>
          </View>
          <View>
            <View className="flex justify-between w-full h-[80px] items-center">
              <Text>整改措施：</Text>
              <Text className="text-[#07C160]">智能生成措施</Text>
            </View>
            <Field
              align="start"
              className=" border border-solid border-[#aaaaaa] rounded"
            >
              <Textarea
                style={{ height: "48px" }}
                placeholder="请输入整改措施"
              />
            </Field>
          </View>
          <View>
            <View className="flex justify-between w-full h-[80px] items-center">
              <Text>备注：</Text>
            </View>
            <Field
              align="start"
              className=" border border-solid border-[#aaaaaa] rounded"
            >
              <Textarea style={{ height: "48px" }} placeholder="请输入备注" />
            </Field>
          </View>
        </View>
      ))}
    </View>
  );
};

export default CheckItem;
